

// 节流函数
export function debounce(func) {

  let timer = null;

  return function (delay = 500,...params) {

    if (timer) clearTimeout(timer);
    timer = setTimeout(function () {

      // console.log("22222");
      func.apply(this,params);

    },delay)

  }
}
